<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 150px;
      height: 60px;
      margin: 20px auto;
      background-color: #ccc;
    }
    .box  a {
      display: block;
      float: left;
      line-height: 60px;
      text-decoration: none;
      color: yellow;
      font-size: 30px;
    }
  </style>
</head>
<body>
  <div class="box">
    <a href="#">☆</a>
    <a href="#">☆</a>
    <a href="#">☆</a>
    <a href="#">☆</a>
    <a href="#">☆</a>
  </div>
  <script src="js/jquery-1.12.4.min.js"></script>
  <script>
    let $as = $(".box a");
    $as.mouseenter(function(){
      $(this).text("★").prevAll().text("★");
    })
    $as.mouseleave(function(){
      $(this).text("☆").prevAll().text("☆");
    })
  </script>
</body>
</html>